feat: add @supabase/middleware regression eval - #273
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mandarini
marked this pull request as ready for review
September 8, 2026 12:18
barryroodt
reviewed
Sep 8, 2026
barryroodt
left a comment
Contributor
There was a problem hiding this comment.
One scorer issue to fix before merge: the prompt permits defining the API-key middleware in a helper module, but the index-only source check rejects that valid layout. This fails the whole eval even when all HTTP checks pass. Could we inspect imported local modules before rejecting the implementation?
mandarini
force-pushed
the
feat/middleware-regression-eval
branch
from
September 10, 2026 08:25
d148dd0 to
24112be
Compare
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
barryroodt
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a regression eval for
@supabase/middleware(https://github.com/supabase/middleware), the sibling of the@supabase/serverpair: the prompt names the package and asks for an Edge Function that composes the built-in CORS middleware with a hand-writtendefineMiddlewareAPI-key gate. The scorer drives the key gate through the local gateway (no key and wrong key both401, right key200with the key id read fromctx), checksVary: Originas the CORS signal, and gates on the source importing the package and callingdefineMiddleware.Two details worth knowing: the local Kong answers preflights and rewrites
Access-Control-Allow-Originto*on/functions/v1/*, soVary: Originis the only CORS behavior observable through it; and the seededfunctions/.envneeded a.gitignoreexception, following the existing one. Refreshed results are included: 6 of 6 runs pass (three with skills, three without), the expected baseline for a usability canary.